<template>
	<view class="content">
		<button @click="changeGet">开始搜索</button>
		<view class="views" v-for="(item, index) in basestationList" :key="index">{{ JSON.stringify(item) }}</view>
	</view>
</template>

<script>
const telephonelib = uni.requireNativePlugin('wrc-telephonelib');
export default {
	data() {
		return {
			basestationList: []
		};
	},

	methods: {
		// 查询基站
		changeGet() {
			uni.showLoading({
				title: '搜索中...',
				mask: true
			});
			telephonelib.getCellInfoData((res) => {
				console.log('查询的基站', res);
				uni.hideLoading();
				if (res.status == '200') {
					let data = res.data;
					this.basestationList = data;
				}
			});
		}
	}
};
</script>

<style lang="scss" scoped>
.content {
	padding: 0 20rpx;
	box-sizing: border-box;
	.views {
		word-wrap: break-word;
	}
}
</style>
